insertChild

abstract fun insertChild(node: Node, beforeNode: Node): Boolean

Inserts the given node before the given beforeNode as a child of the current node. The new node can be an existing node in the document, or you can create and insert a new node. If the node is existing node, it will be moved to a new location in the document.

Return

true if the given node was successfully inserted

Parameters

node

the node to insert

beforeNode

the node before which the node will be inserted

Throws

when this node is closed